Fix detectRetina example in API. Fixes #562