Fixes for VS 2005 builder