Fixes "'long' not defined" when used with python 3