scons: fix memory leak in configure test