Fix String::startsWith,endsWith for undefined