Add ifdefs for making extension work with fann 2.1