Fix test_compile_error tests for different platforms