Fix up enumeration mismatch issues (CTLineBreakMode vs NSLineBreakMode), and use system function instead of rolling our own for NSTextAlignmentFromCTTextAlignment

Ported from https://github.com/jverkoey/nimbus/commit/ee30cf904807379a05d27286cd2018f0dec0f42a