Adding capability detection tests

- Added conditional using karma+browserstack to test capability detection in actual browsers
- Made fix needed in capability detection
- Passing all tests