Updated to work in older Maya

Now works correctly in both Maya 2014 and 2013