Added Mac target and made Mac compatible.