Fix testing scope failures when not testing

Ensure testing is defined when using web-animations.js outside of testing.