Magnetodielectric and magnetoelectric effect in Mn4Ta2O9