Add an explicit type cast that seems to be necessary for 32bit systems