Support custom bitstypes (fix #99)