Avoid using non-portable dd conv=osync option
The same thing can be achieved using the bs=$SIZE and conv=sync options.
Unlike conv=osync, conv=sync is support on both Linux and macOS.
(cherry picked from commit 87c5e64c64e43be532cb703e96c0776309aab337)