Semiempirical calculation of barriers to pyramidal inversion for first- and second-row elements