Improve compatibility on gcc 4.6 and add some additional tests