Revert "[build] Rework the buildver dep check."

This reverts commit a9f31e63db668955e2723796201d5c12dd146eae.

Revert this as it breaks make dist by having a source file depend on a generated file.
[runtime] Add another rule for the builder-sgen.h -> main-sgen.o dependency since apparently some versions of automake etc. generate a main-sgen.o file too.