The syntax for inline index declaration was added in SQL Server 2014, though that is was absolutely unclear in the official CREATE TABLE
documentation. After speaking to the documentation owners, that topic now accurately reflects that inline index syntax is only valid starting with SQL Server 2014 (and some variations in 2016):
The other instances, where this syntax is working for you, must be on SQL Server 2014 or newer.
On 2012, regardless of compatibility level, you'll need to create the index separately.