Ab initio multireference study of the BN molecule