Update subdomain.js

matches.length will error out of there are no matches at all and matches is undefined.
This checks if matches exist before calling matches.length.
Merge pull request #5 from datenpunk/patch-1

Update subdomain.js