gtlua: take care of double->integer conversions

Closes #313.