Magnetocrystalline anisotropy of Ni and Mn substituted Nd2Fe14B compounds