Fixed serial terminal method crash in OS X java 1.6_15