Fixes for Unity version 4.5

This commit includes some of the changes made in previous pull requests as well as my own changes to make XUPorter compatible with version 4.5 of Unity.