Fix building in mono and remove a few compiler warnings highlighted by b...

Fix building in mono and remove a few compiler warnings highlighted by building with xbuild.

xbuild doesn't like toolsversion 12.0 see http://forums.xamarin.com/search?Search=ToolsVersion