Make PHP version check more reliable