Fix boolean conversion with php 5.6