Fix segmentation fault with newer musl and improve throughput. Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>