Energy dispersive X-ray diffraction study of structural phase transitions in BaMnF4