move code to a block, simplify fcgi compile time dependency