Fix windows build. Refs #9202

Also fixed one cppcheck warning