remove dependence on pow/floor in cjson