clean up apple-specific platform code