Bangladesh beat New Zealand despite Latham heroics