Fix compilation due to misplaced #endif

Fixes compilation with gcc 4.7 on Debian squeeze.