Buckling of functionalized single-walled nanotubes under axial compression