Fixes for Visual C compilers