replace trunc with int

this fixes the issues on el5