Fix some compiler-specific build issues