Added API utf8 conversion option
Moved PHP version check to an earlier position