[DF-1086] Implementation fmod for MacOS