fix build scripts.
Pass thread count for h265/hevc also