Theoretical insights into the nature of the semipolar bonds X-O (X=N, P)