Merge pull request #543 from jimjag/upstream These may not be longs (eg: OSX)... fo a safe cast to ensure.