fix error on non apple platforms