Fix compilation of Max 7 plugin in VisualStudio 12

Fixes several small problems that were recently introduced.

The plugin compiles successfully under the 2004, 2008, 2010, and 2012 Max SDKs, and no new regressions were noted in exports made with 2004 and 2012.