Symmetry and magnetoelectric interactions in BaMnF4