Added --as-needed linker flag for smaller size. Small configure adjustments. Signed-off-by: Rosen Penev <rosenp@gmail.com>