Added support for retina display on macosx

Fix #2309