Fixes issue where "head" is undefined in Safari 4. Also adds regresson test

**Status**: *Ready to merge*
  
## Changes
- Fixes an issue where "head" is undefined in Safari 4. Also adds a regression test.
 
## How to test-drive this PR
- Download Safari 4.0.5 (http://mirror.jquery.com/multi-safari/multi-safari-4.0.5-snow-leopard.zip)
- `grunt serve` and navigate to `http://localhost:3000/tests/capture.html`