Visual Studio 2013 compatibility changes.

These fix two of the three issues reported in issue #498