Fixed some compilation problems.

Old hal_bio_ax12 code is saved at
https://gist.github.com/Mithrandir0x/6c237d6bf6df113ac2ae