fix php5.4 compatabillity. fixes #231