added conditional compilation code for 3.9 kernel