Updated platform detection for Firefox

Since the "components" object is deprecated on Firefox, this moves to a more robust method of detecting its platform.