Fixed bug that causes php < 5.6 to hang.

The gmp object in php < 5.5 somehow keeps a large floating point number (0.00000003...) even though it should round to 0.