Fix compilation -Wmismatched-tags warnings

This pull request fixes warnings coming from -Wmismatched option with the use of clang compiler.