Refining MediaMatch polyfill for easier testing