Fix compatibility with  centos 6.5 (rhel)

Hi, I have made some minor fixes to make the cooking finish successfully on centos 6.5. Tested.