fixed build bug in mac os x