Should also check if the compiler is clang. Shouldn't need patch (and will probably fail) when building using GNU GCC.