Fix for older Chrome that lists regexp class as object