Fixed build on Apple platforms