Fix command line and visual studio builds.