Wave propagation in optically active and magnetoelectric media of arbitrary geometry