Make library 4.2 compatible