javascript string replaceall is not a function