ifdef some functions that depend on other TWRP parts

End goal is to create a twrpTar binary that can run from the
command line.

Change-Id: I14f07a425b7755bd09dbce95a5918da1430964fc