Added reference.ts to solve some dependancy issues
changed os x bui;ld script