Fix encoding detection for php before 5.4
Merge pull request #162 from aseques/kannel_encoding

fix regression due to #160 fix encoding detection for php before 5.4