Molecular envelope of the planetary nebula NGC 7027