Buckling of sheared and compressed microfibrils