Fix JS error for users that don't have Ajax included

Some users only include prototype on certain pages, this conditional will always error unless it's included.