Make sure to get the correct type of variables when compiling ivars.
Merge pull request #128 from pjonsson/issue127

Make sure to get the correct type of variables when compiling ivars.