Improvements to C header guard functions