fixed Mac/iOS compilation