Install BTS, patch to 3.17, then copy your game directory to something like /Program Files/Firaxis Games/Civilization IV/Beyond the Sword 3.17/ as opposed to just /Beyond the Sword/.
Patch the main game to 3.19 like normal, then create a shortcut to the exe for 3.17, an label it as such.