reorder includes so protocol is first
Initial attempt at fixing Issue #19. Fix regexps on 5.10

I think we might have leaked when decoding regexps in some situations,
this should also fix that. A follow up patch will let us know