7ea111322b
This detection method is not bullet-proof, but should work for now. Ref: https://stackoverflow.com/a/3540295