Use bit32 as bit if available
Fix a couple errors that cropped up
Be safe in 5.2 strict