Add the missing includes and fix #22