queue: fix pointer truncation on LLP64 platforms

Fix for #835. Making travis run the tests.